<!--<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
		onload = function(){
		var oBox = document.getElementById("box");
			//attributes;属性集合（数组）
			console.log(oBox.attributes);//[object NamedNodeMap]
			console.log(oBox.attributes.length);//3
			console.log(oBox.attributes[0]);//id="box"
			
			console.log("============");
			console.log(oBox.attributes[0].nodeType);//2 ,节点类型
			console.log(oBox.attributes[1].nodeType);//2
			console.log(oBox.attributes[2].nodeType);//2
			
			console.log("-------------");
			console.log(oBox.attributes[0].nodeName);//id
			console.log(oBox.attributes[1].nodeName);//class
			console.log(oBox.attributes[2].nodeName);//style
			console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
			console.log(oBox.attributes[0].nodeValue);//box
			console.log(oBox.attributes[1].nodeValue);//pox
			console.log(oBox.attributes[2].nodeValue);//background:red;
			console.log("￥￥￥￥￥￥￥￥￥￥￥￥￥￥￥￥￥￥");
			console.log(oBox.attributes["id"].nodeName);//id
			console.log(oBox.attributes.getNamedItem("id").nodeName);//id
			console.log(oBox.attributes[0].nodeName);//id
			
		};
			
		</script>
	</head>
	<body>
		<div id="box" class="pox" style="background: red;">文本内容</div>
	</body>
</html>-->
